package cn.itcast.web.tag;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;

public class OtherwiseTag extends SimpleTagSupport {

	@Override
	public void doTag() throws JspException, IOException {
		
		ChooseTag parent = (ChooseTag) this.getParent();//得到父标签
		if(parent.isOk()==false){
			this.getJspBody().invoke(null);
			parent.setOk(true); //给父标签设置为真  其他的子标签不能执行
		}
		
	}

	
	
}
